﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Edit.Master" Inherits="System.Web.Mvc.ViewPage<Langben.DAL.ts_goodsclass>" %>

<%@ Import Namespace="Common" %>
<%@ Import Namespace="Models" %>
<asp:Content ID="Content4" ContentPlaceHolderID="CurentPlace" runat="server">
    修改 物品分类表
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <fieldset>
        <legend>
            <input class="a2 f2" type="submit" value="修改" />
            <input class="a2 f2" type="button" onclick="BackList('ts_goodsclass')" value="返回列表" />
        </legend> 
       <div class="bigdiv">
        <%: Html.HiddenFor(model => model.Id ) %> 
        <%: Html.HiddenFor(model => model.i_m)%>
            <table style="width:100%">
            <tr><td width="15%" align="right"> <%: Html.LabelFor(model => model.c_class) %>：</td>
            <td width="85%"> <%: Html.EditorFor(model => model.c_class) %>
                <%: Html.ValidationMessageFor(model => model.c_class) %></td>
            </tr><tr><td align="right"> <%: Html.LabelFor(model => model.c_class1) %>：</td>
            <td> <%: Html.EditorFor(model => model.c_class1) %>
                <%: Html.ValidationMessageFor(model => model.c_class1) %></td>
            </tr><tr><td align="right"></td>
            <td><input type="checkbox" id="cbi_m" onclick="Changei_m();" />&nbsp;原料 </td>
            </tr><tr><td align="right"><%: Html.LabelFor(model => model.c_id) %>：</td>
            <td> <%: Html.EditorFor(model => model.c_id) %>
                <%: Html.ValidationMessageFor(model => model.c_id) %></td>
            </tr></table>
                
        </div>
    </fieldset>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    
    <script type="text/javascript">

        $(function () {

            if ($('#i_m').val() == "0") {
                $('#cbi_m').attr("checked", false);
            }
            else {
                $('#cbi_m').attr("checked", true);
            }
        });

        function Changei_m() {
            if ($("#cbi_m").attr("checked")) {
                $('#i_m').val('1');
            }
            else {
                $('#i_m').val('0');
            }
        }
              

    </script>
</asp:Content>

